﻿using SuperMicroWave.Common;
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace SuperMicroWave.Converters
{
    public class PauseBtnVisibilityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string val = (string)value;
            if(val == "../Assets/Images/开始.png" || GlobalValue.NowState.IsAutoClean)
                return Visibility.Hidden; 
            else
                return Visibility.Visible;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

    public class HeatBtnToolTipConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string val = (string)value;
            if (val == "../Assets/Images/开始.png")
                return "开始";
            else
                return "结束";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

    public class PauseBtnToolTipConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string val = (string)value;
            if (val == "../Assets/Images/暂停.png")
                return "暂停";
            else
                return "继续";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
